<%@ include file="/taglibs.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<head>
<title>北京邮电大学学生党员在线学习中心</title>

<link href="${ctx}/css/jquery.treeview.css" rel="stylesheet"
	type="text/css" />
<link href="${ctx}/css/pagination.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx }/treeView/jquery.cookie.js"></script>
<script type="text/javascript" src="${ctx }/treeView/jquery.treeview.js"></script>
<script type="text/javascript">
			$(document).ready(function() {
				$("#tree").treeview({
					collapsed: true,
					animated: "fast",
					control:"#sidetreecontrol",
					prerendered: true,
					persist: "location"
				});
			})
		</script>
<script type="text/javascript">
			function confirmDelete(){
				return confirm("确定删除吗？");
			}
		</script>
</head>

<s:if test="#session.session_user.adminName != null">
	<div id="nav_bar">
		<img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt="" />
		<div id="welcome_label">
			欢迎您，&nbsp;
			<s:property value="#session.session_user.adminName" />
			!
		</div>
		<img id="nav_bar_seperator"
			src="../../../styles/nav_bar_seperator.png" alt="" />
		<div id="nav_location">
			<img id="nav_bar_point" src="../../../styles/nav_bar_point.png"
				alt="" />
			<div id="nav_cur_location">
				当前位置：&nbsp;<a href="${ctx}/Admin_PartyNewsAction_managePartyNews">党建动态管理</a>&nbsp;&nbsp;>&nbsp;&nbsp;<span
					style="color: black;">学校要闻管理</span>
			</div>
		</div>
		<img style="float: right; width: 5px;"
			src="../../../styles/nav_bar_right.png" alt="" /> <a id="nav_logout"
			href="${ctx}/logoutAction_adminLogout">[安全退出]</a>
	</div>
</s:if>

<div style="clear: both; height: 5px;">&nbsp;</div>
<div style="min-height: 450px;">
	<!-- left -->
	<div id="side_menu" style="min-height: 670px;">
		<div id="side_menu_title">
			<img src="../../../styles/side_menu_title_img.png" alt="" /> <span>党建动态管理</span>
		</div>
		<div id="side_menu_title_bottom">&nbsp;</div>
		<s:if test="#session.session_user.adminLevel == 3">
			<div class="side_sub_menu">
				<div class="side_menu_point">&nbsp;</div>
				<a href="${ctx}/Admin_PartyNewsAction_manageSpiritNews">上级精神管理</a>
			</div>
			<div class="side_menu_seperator">&nbsp;</div>
			<div class="side_sub_menu_focus">
				<div class="side_menu_point">&nbsp;</div>
				<a href="${ctx}/Admin_PartyNewsAction_manageSchoolNews">学校要闻管理</a>
			</div>
			<div class="side_menu_seperator">&nbsp;</div>
			<div class="side_sub_menu">
				<div class="side_menu_point">&nbsp;</div>
				<a href="${ctx}/Admin_PartyNewsAction_manageCollegeNews">院系风采管理</a>
			</div>
		</s:if>
		<s:elseif test="#session.session_user.adminLevel == 2">
			<div class="side_sub_menu">
				<div class="side_menu_point">&nbsp;</div>
				<a href="${ctx}/Admin_PartyNewsAction_manageCollegeNews">院系风采管理</a>
			</div>
		</s:elseif>
	</div>

	<div id="main_content">
		<div id="main_content_title">
			<img src="../../../styles/content_title_img.png" alt="" /> <span>学校要闻管理</span>
		</div>
		<div class="main_content_title_bottom">&nbsp;</div>
		<form action="${ctx }/Admin_PartyNewsAction_manageSchoolNews"
			method="post">
			<table>
				<tr>
					<td style="width: 120px; text-align: center;">请输入查询内容：</td>
					<td><input type="text" name="titleOnQuery" size=60
						value="<s:property value="titleOnQuery"/>"></td>
					<td style="width: 60px; text-align: center;"><input
						type="submit" name="button" id="button" class="input-button"
						value="查询" /></td>
					<td><input id="learn" name="learn" type="button"
						class="input-button" value="发布新学校要闻"
						onclick="window.location.href='Admin_PartyNewsAction_newSchoolNews'" />
					</td>
				</tr>
			</table>
			<input type="hidden" name="pageNow" value="1" />
		</form>
		<br />
		<table class="list-table">
			<tr>
				<th style="width:380px;">标题</th>
				<th>发布者</th>
				<th>发布时间</th>
				<th>是否图片新闻</th>
				<th>操作</th>
			</tr>
			<s:iterator value="partyNews" status="st" id="party">
				<tr>
					<td style="width:380px;"><a
						href="Admin_PartyNewsAction_viewNews?id=<s:property value="id"/>"
						target=""  title="<s:property value="title" />">
						<s:if test="%{title.length()>30}">
								<s:property value="title.substring(0,30)+'...'" />
						</s:if> 
						<s:else>
								<s:property value="title" />
						</s:else> 
						
					</a></td>
					<td><s:property value="adminNoToNameMap.get(posterNo)" /></td>
					<td><s:date name="postTime" format="yyyy年MM月DD日" /></td>
					<td style="text-align: center;"><s:if test="picTag == 1">
							<font color=red>是</font>
						</s:if> <s:else>
							否
						</s:else></td>
					<td><a
						href="Admin_PartyNewsAction_modifyNews?id=<s:property value="id"/>&pageNow=<s:property value="#request.modifyNewsPageNow"/>&tag=<s:property value="#request.tag"/>">修改</a>&nbsp;&nbsp;&nbsp;
						<a
						href="Admin_PartyNewsAction_deleteNews?id=<s:property value="id"/>&pageNow=<s:property value="#request.modifyNewsPageNow"/>"
						onclick="return confirmDelete();">删除</a></td>
				</tr>
			</s:iterator>
		</table>
		<div style="clear: both; height: 10px;"></div>
		<div style="margin-left: 0; text-align: center;">
			<s:property value="paginationCode" escape="false" />
		</div>
	</div>
	<div style="clear:both;">&nbsp;</div>
</div>